<template>
    <card-item 
        :data="data"
        item-layout="remove"
        @update="queryData"
    >
        <template v-slot:header>
            <div class="head-tip">
                此处展示的为系统推荐且使用频率较高的网站，可根据自身需求，点击右侧的-号移除
            </div>
        </template>
    </card-item>
</template>

<script>
import CardItem from '../../nav/components/card-item.vue';

export default {
    components: {
        CardItem,
    },
    data() {
        return {
            data: {
                title: '收藏网站',
                imgurl: '/images/home/zhuomian.png',
                content: [],
            },
        };
    },
    methods: {
        queryData() {
            this.$get(`${this.$store.state.api.webUrl}/index/getmydesk.json`, data => {
                this.data.content = data;
            });
        },
    },
    mounted() {
        this.queryData();
    },
};
</script>

<style lang="scss" scoped>
@import '@css/var.scss';
.head-tip{
    color: #838383;
}
</style>